set(MyGUISquirrel_SRC
	MyGUISquirrel.cpp
	${CMAKE_CURRENT_BINARY_DIR}/Wrapper.cpp
)

set(Wrapper_INC
	-I${Xern_SOURCE_DIR}/thirdparty/MyGUI3.0/MyGUIEngine/include
)

add_custom_command(
  OUTPUT Wrapper.cpp 
  COMMAND Swig ${Wrapper_INC} -Wall -c++ -squirrel -o Wrapper.cpp ${CMAKE_CURRENT_SOURCE_DIR}/Wrapper.i
)
 
add_library(MyGUISquirrel MODULE ${MyGUISquirrel_SRC})
add_dependencies(MyGUISquirrel Wrapper.i Swig)
target_link_libraries(MyGUISquirrel MyGUIEngine Squirrel Xern uuid)
